﻿using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;

namespace WeShare.WeiXin.Mp.TemplateNotice.Entity
{
    public class SubscribeNotice
    {
        /// <summary>
        ///填接收消息的用户openid
        /// </summary>
        [JsonProperty("touser")]
        public string Touser { get; set; }
        /// <summary>
        /// 订阅消息模板ID
        /// </summary>
        [JsonProperty("template_id")]
        public string TemplateId { get; set; }
        /// <summary>
        /// 点击消息跳转的链接，需要有ICP备案
        /// </summary>
        [JsonProperty("url")]
        public string Url { get; set; }
        /// <summary>
        /// 跳小程序所需数据，不需跳小程序可不用传该数据
        /// </summary>
        [JsonProperty("miniprogram")]
        public MiniProgram MiniProgram { get; set; }
        [JsonProperty("scene")]
        public int Scene { get; set; }
        [JsonProperty("title")]
        public string Title { get; set; }
        /// <summary>
        /// 消息正文，value为消息内容文本（200字以内），没有固定格式，可用\n换行，color为整段消息内容的字体颜色（目前仅支持整段消息为一种颜色）
        /// </summary>
        [JsonProperty("data")]
        public SubscribeNoticeData Data { get; set; }
    }

    public class SubscribeNoticeData
    {
        [JsonProperty("content")]
        public SubscribeNoticeContent Content { get; set; }
    }
    public class SubscribeNoticeContent
    {
        [JsonProperty("value")]
        public string Value { get; set; }
        [JsonProperty("color")]
        public string Color { get; set; }
    }
}
